<!---
    Title:      EPAR1.1 
    Author:     Bruce Frick
    Purpose:    Step4 BadgeReport
--->

<cfset BASE = CreateObject("component", "cfc.base") / >
<cfset statusQueries = CreateObject("component", "cfc.statusQueries") />
<cfset baseQueries = CreateObject("component", "cfc.queries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
    "/jquery/ui-1.8.5/jquery-ui.min.js,/jquery/plugins/scrollTo/jquery.scrollTo-1.4.2-min.js,js/Step5-EmpNoUpdate.js", <!---JS links--->
    "/jquery/ui-1.8.5/themes/cupertino/jquery-ui.css", <!---CSS links--->
    "Step 5:  Finance - Employee ## Update", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->

    
<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.FINANCE)>   
    
    <!---Query objects--->
    <cfset QUERIES = {} />

    <!---Query objects--->  
    
    <h1 class="title">Step 5:  Finance - Employee ## Update</h1>
    <div class="entry">
                    
        <p>
        Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.  
        In this step, provide the Navigator Employee numbers as determined 
        when they are added to Navigator.</p>
        <br />
        <br />
        
        <cfform name="frmStep5" method="post" action="api.cfm?api=step5_finance_creation"> 
            
            <cfset QUERIES.GetStep5Waiting = statusQueries.funcGetSCFStepWaiting(6) />
            
			<cfif QUERIES.GetStep5Waiting.recordcount GT 0>
	            
				<table width = 100%> 
					<tr>
					    <td colspan="5">
					        <span class="tableHeader">Finance Creation Report</span>   
					    </td>
					    <td align="right" nowrap="nowrap" colspan=4 style="padding-right:3px">                                  
					        <cfinclude template="PrintFinanceReport.cfm">               
					        <cfinclude template="PrintFinanceManagerReport.cfm">
					        <a href="Temp/FinanceCover.pdf" target="_blank">Print Cover Pages</a> &nbsp;&nbsp;&nbsp;
					        <a href="Temp/Finance.pdf" target="_blank">Print Report</a>   
					    </td>
					</tr>
					<tr>
					    <td width =25%>&nbsp;</td> 
					    <td><u>##</u></td> 
					    <td width=5%>&nbsp;</td> 
					    <td nowrap="nowrap">
					        <strong><u>Name, Job Title, &amp; Department</u></strong>
					    </td>
					    <td width =5%>&nbsp;</td> 
					    <td>
					        <strong><u>New Employee No</u></strong>
					    </td>
					    <td width =5%>&nbsp;</td> 
					    <td>
					        <strong><u>Comments</u></strong>
					    </td> 
					</tr>
					                                                   
					<cfloop from="1" to="#QUERIES.GetStep5Waiting.RecordCount#" index="i">
					   
                       <cfset QUERIES.GetEmpInfo = baseQueries.funcGetEmpInfo( QUERIES.GetStep5Waiting.ID[i] ) />                    
		               <cfset QUERIES.GetPositionInfo = baseQueries.funcGetPositionInfo( QUERIES.GetEmpInfo.PositionID ) />
		               <cfset QUERIES.GetDepts = baseQueries.funcGetDepts( QUERIES.GetEmpInfo.DeptID ) />
         
					   <tr>
						    <td>&nbsp;</td>
						    <td valign="top">#i#)</td>
						    <td>&nbsp;</td>  
						    <td nowrap="nowrap" valign="top">
						        #QUERIES.GetStep5Waiting.Name[i]#<BR />
						        #QUERIES.GetPositionInfo.PositionCodeDescription#<BR />
						        #QUERIES.GetDepts.OrganizationDescription#<BR />
						    </td>
						    <td>&nbsp;</td> 
						    <td align="right" valign="top">
						        <cfinput type="text" name="EmpNo_#QUERIES.GetEmpInfo.ID#_#QUERIES.GetStep5Waiting.ID[i]#" 
                                    error_message="If provided, Employee ## for '#QUERIES.GetStep5Waiting.Name[i]#' must be numeric.  Please provide the number ID created in Navigator.">
						    </td>
						    <td>&nbsp;</td> 
						    <td colspan="2" valign="top">
                                <cftextarea name="Comments_#QUERIES.GetEmpInfo.ID#_#QUERIES.GetStep5Waiting.ID[i]#" style="width:250px"/></td> 
					   </tr>
					   <tr>
						    <td>&nbsp;</td> 
					   </tr>
                                    
					</cfloop>
					
					<tr>
					    <td colspan="13" align="right">
					        <cfinput type="hidden" name="FormIndicator" value="0">
					        <cfinput type="button" name="Submit" value="Submit">
					    </td> 
					</tr>
				</table>

	        <cfelse>
	            <span class="error">At the present time, there are not any employees staged for entry to the Finance system.</span>
	        </cfif>
         
        </cfform>        
        
    </div>

<cfelse>
    <cfinclude template="denied.cfm">
</cfif>


<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>
